<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
require_once 'Connections/staf.php';
$query_kursus = sprintf("select scdp from maklumat_kursus");
$result_kursus = mysql_query($query_kursus)or die(mysql_error());
while($row_kursus = mysql_fetch_assoc($result_kursus)){
    $data[] = array(
        'label' => $row_kursus['scdp'],
        'value' => $row_kursus['scdp']
    );
}

$json = json_encode($data);
echo $json;
?>
